import { Bi } from "@/module-00-codebase/pkg-01-container";

export class SysParamManager {
  public get(key: string) {
    return cache.get(key);
  }
}
export const dependencies = () => ["Rpc"];
export const initializing = async () => {
  const res = await Bi.rpc.send({ resourceName: "innerSysParam", action: "getlist", loading: "Loading system parameters..." });
  const list = res.data.list as { name: string; value: string }[];
  list.forEach(item => cache.set(item.name, item.value));
};
const cache = new Map<string, string>();
